<%--
  Created by IntelliJ IDEA.
  User: 谢斌
  Date: 2021/1/21
  Time: 17:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <!-- 包含公共的JSP代码片段 -->

    <title>餐馆王平台</title>


    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="${ctx}/style/js/jquery.js"></script>
    <script type="text/javascript" src="${ctx}/style/js/page_common.js"></script>
    <link href="${ctx}/style/css/common_style_blue.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="${ctx}/style/css/index_1.css"/>
</head>
<body>
<!-- 页面标题 -->
<div id="TitleArea">
    <div id="TitleArea_Head"></div>
    <div id="TitleArea_Title">
        <div id="TitleArea_Title_Content">
            <img border="0" width="13" height="13" src="${ctx}/style/images/title_arrow.gif"/> 餐桌列表
        </div>
    </div>
    <div id="TitleArea_End"></div>
</div>


<!-- 过滤条件 -->
<div id="QueryArea">
    <form action="table?action=findByTableName" method="post">
        <input type="text" name="keyword" title="请输入餐桌名称">
        <input type="submit" value="搜索">
    </form>
</div>


<!-- 主内容区域（数据列表或表单显示） -->
<div id="MainArea">
    <table class="MainArea_Content" cellspacing="0" cellpadding="0">
        <!-- 表头-->
        <thead>
        <tr align="center" valign="middle" id="TableTitle">
            <td>编号</td>
            <td>桌名</td>
            <td>状态</td>
            <td>预定时间</td>
            <td>操作</td>
        </tr>
        </thead>
        <!--显示数据列表 -->
        <tbody id="TableData">
        <c:forEach items="${tables}" var="tables" varStatus="vs">
            <tr class="TableDetail1">
                <td align="center">${vs.index+1}&nbsp;</td>
                <td align="center"> ${tables.tableName}&nbsp;</td>
                <td align="center">
                    <c:if test="${tables.tableStatus==1}"><span>预定</span></c:if>
                    <c:if test="${tables.tableStatus==0}"><span>空闲</span></c:if>
                </td>
                <td align="center">${tables.reserveTime}</td>
                <td>
                    <a href="table?action=update&tableId=${tables.tableId}" class="FunctionButton">
                        <c:if test="${tables.tableStatus==1}"><span>退桌</span></c:if>
                        <c:if test="${tables.tableStatus==0}"><span>预定</span></c:if>
                    </a>
                    <a href="table?action=delete&tableId=${tables.tableId}" onClick="return delConfirm(${vs.index+1});"
                       class="FunctionButton">删除</a>
                </td>
            </tr>
        </c:forEach>



        </tbody>
    </table>

    <!-- 其他功能超链接 -->
    <div id="TableTail" align="center">
        <div class="FunctionButton"><a href="${ctx}/table/table-save.jsp">添加</a></div>
    </div>
</div>
</body>
</html>
